home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Tool Chest / !Interfaces / Universal Interfaces 2.0a1 / CIncludes / Retrace.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-17  |  2.9 KB  |  139 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Retrace.h
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Universal Interfaces 2.0a1.  ETO #15, MPW prerelease.  Sunday, July 17, 1994. 
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. */
  16.  
  17. #ifndef __RETRACE__
  18. #define __RETRACE__
  19.  
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. /*    #include <ConditionalMacros.h>                                */
  25.  
  26. #ifndef __OSUTILS__
  27. #include <OSUtils.h>
  28. #endif
  29. /*    #include <MixedMode.h>                                        */
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if GENERATINGPOWERPC
  36. #pragma options align=mac68k
  37. #endif
  38.  
  39. #ifdef __CFM68K__
  40. #pragma lib_export on
  41. #endif
  42.  
  43. typedef struct VBLTask VBLTask, *VBLTaskPtr;
  44.  
  45. /*
  46.         VBLProcPtr uses register based parameters on the 68k and cannot
  47.         be written in or called from a high-level language without the help of
  48.         mixed mode or assembly glue.
  49.  
  50.         In:
  51.          => vblTaskPtr      A0.L
  52. */
  53.  
  54. #if GENERATINGCFM
  55. typedef UniversalProcPtr VBLUPP;
  56. #else
  57. typedef Register68kProcPtr VBLUPP;
  58. #endif
  59.  
  60. struct VBLTask {
  61.     QElemPtr                        qLink;
  62.     short                            qType;
  63.     VBLUPP                            vblAddr;
  64.     short                            vblCount;
  65.     short                            vblPhase;
  66. };
  67. enum {
  68.     uppVBLProcInfo = kRegisterBased
  69.          | REGISTER_ROUTINE_PARAMETER(1, kRegisterA0, SIZE_CODE(sizeof(VBLTaskPtr)))
  70. };
  71.  
  72. #if GENERATINGCFM
  73. #define NewVBLProc(userRoutine)        \
  74.         (VBLUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppVBLProcInfo, GetCurrentArchitecture())
  75. #else
  76. #define NewVBLProc(userRoutine)        \
  77.         ((VBLUPP) (userRoutine))
  78. #endif
  79.  
  80. #if GENERATINGCFM
  81. #define CallVBLProc(userRoutine, vblTaskPtr)        \
  82.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppVBLProcInfo, (vblTaskPtr))
  83. #else
  84. /* (*VBLProcPtr) cannot be called from a high-level language without the Mixed Mode Manager */
  85. #endif
  86.  
  87. extern pascal QHdrPtr GetVBLQHdr(void)
  88.  THREEWORDINLINE(0x2EBC, 0x0000, 0x0160);
  89.  
  90. #if !GENERATINGCFM
  91. #pragma parameter __D0 SlotVInstall(__A0, __D0)
  92. #endif
  93. extern pascal OSErr SlotVInstall(QElemPtr vblBlockPtr, short theSlot)
  94.  ONEWORDINLINE(0xA06F);
  95.  
  96. #if !GENERATINGCFM
  97. #pragma parameter __D0 SlotVRemove(__A0, __D0)
  98. #endif
  99. extern pascal OSErr SlotVRemove(QElemPtr vblBlockPtr, short theSlot)
  100.  ONEWORDINLINE(0xA070);
  101.  
  102. #if !GENERATINGCFM
  103. #pragma parameter __D0 AttachVBL(__D0)
  104. #endif
  105. extern pascal OSErr AttachVBL(short theSlot)
  106.  ONEWORDINLINE(0xA071);
  107.  
  108. #if !GENERATINGCFM
  109. #pragma parameter __D0 DoVBLTask(__D0)
  110. #endif
  111. extern pascal OSErr DoVBLTask(short theSlot)
  112.  ONEWORDINLINE(0xA072);
  113.  
  114. #if !GENERATINGCFM
  115. #pragma parameter __D0 VInstall(__A0)
  116. #endif
  117. extern pascal OSErr VInstall(QElemPtr vblTaskPtr)
  118.  ONEWORDINLINE(0xA033);
  119.  
  120. #if !GENERATINGCFM
  121. #pragma parameter __D0 VRemove(__A0)
  122. #endif
  123. extern pascal OSErr VRemove(QElemPtr vblTaskPtr)
  124.  ONEWORDINLINE(0xA034);
  125.  
  126. #ifdef __CFM68K__
  127. #pragma lib_export off
  128. #endif
  129.  
  130. #if GENERATINGPOWERPC
  131. #pragma options align=reset
  132. #endif
  133.  
  134. #ifdef __cplusplus
  135. }
  136. #endif
  137.  
  138. #endif /* __RETRACE__ */
  139.